home *** CD-ROM | disk | FTP | other *** search
- //***********************************************************************
- //
- // PropDemo.h
- //
- //***********************************************************************
-
- class CMyApp : public CWinApp
- {
- public:
- virtual BOOL InitInstance ();
- };
-
- class CBkgndPage : public CPropertyPage
- {
- public:
- int m_nFillType;
- int m_nFillColor;
-
- CBkgndPage () : CPropertyPage (IDD_BKGNDPAGE) {}
-
- protected:
- virtual void DoDataExchange (CDataExchange*);
-
- afx_msg void OnChange (UINT);
- DECLARE_MESSAGE_MAP ()
- };
-
- class CTextPage : public CPropertyPage
- {
- public:
- CString m_text;
- int m_nHeight;
- BOOL m_bBold;
- BOOL m_bItalic;
-
- CTextPage () : CPropertyPage (IDD_TEXTPAGE) {}
-
- protected:
- virtual void DoDataExchange (CDataExchange*);
-
- afx_msg void OnChange ();
- DECLARE_MESSAGE_MAP ()
- };
-
- class CMyPropertySheet : public CPropertySheet
- {
- public:
- CBkgndPage m_bkgndPage;
- CTextPage m_textPage;
-
- CMyPropertySheet (CWnd* = NULL);
-
- protected:
- afx_msg void OnApplyNow ();
- DECLARE_MESSAGE_MAP ()
- };
-
- class CMainWindow : public CFrameWnd
- {
- private:
- int m_nFillType;
- int m_nFillColor;
- CString m_text;
- int m_nHeight;
- BOOL m_bBold;
- BOOL m_bItalic;
-
- void DoSolidFill (CDC*, CRect*);
- void DoGradientFill (CDC*, CRect*);
- void DoDrawText (CDC*, CRect*);
-
- public:
- CMainWindow ();
- void ApplyNow (CMyPropertySheet*);
-
- protected:
- afx_msg BOOL OnEraseBkgnd (CDC*);
- afx_msg void OnPaint ();
- afx_msg void OnOptionsProperties ();
- afx_msg void OnOptionsExit ();
- afx_msg void OnOptionsAbout ();
-
- DECLARE_MESSAGE_MAP ()
- };
-
- class CAboutDialog : public CDialog
- {
- private:
- CRect m_rect;
-
- public:
- CAboutDialog (CWnd* pParentWnd = NULL) :
- CDialog (IDD_ABOUTDLG, pParentWnd) {}
-
- virtual BOOL OnInitDialog ();
-
- protected:
- afx_msg void OnPaint ();
- DECLARE_MESSAGE_MAP ()
- };
-